package com.lmt.service;

import com.lmt.base.ResultData;
import com.lmt.entity.DigitalDictionary;
import com.lmt.entity.search.DigitalDictionarySearch;

import java.util.List;

/**
 * Date 2018/07/17
 *
 * @author MT-Lin
 */
public interface DigitalDictionaryService {

	/**
	 * 保存数据字典
	 * @param digitalDictionary 要保存的数据字典的实体
	 * @return ResultData
	 */
	ResultData save(DigitalDictionary digitalDictionary);

	/**
	 * 查询所有数据字典
	 * @param digitalDictionarySearch 查询条件
	 * @return ResultData
	 */
	ResultData findAll(DigitalDictionarySearch digitalDictionarySearch);

	/**
	 * 根据ID获取字典
	 * @param id 字典ID
	 * @return ResultData
	 */
	ResultData findOneById(String id);

	/**
	 * 更新数据字典
	 * @param digitalDictionary 要更新的数据字典实体
	 * @return ResultData
	 */
	ResultData update(DigitalDictionary digitalDictionary);

	/**
	 * 根据关键词查找
	 * @param digitalDictionarySearch 查找条件
	 * @return ResultData
	 */
	ResultData search(DigitalDictionarySearch digitalDictionarySearch);

	/**
	 * 删除数据字典
	 * @param digitalDictionaries 要删除的数据字典集合
	 * @return ResultData
	 */
	ResultData delete(List<DigitalDictionary> digitalDictionaries);

	/**
	 * 获取父节点选择树
	 * @return ResultData
	 */
	ResultData getParentCodeTree();

	/**
	 * 获取选项
	 * @param parentCode 父编码
	 * @return ResultData
	 */
	ResultData getChildrenForSelect(String parentCode);
}
